package com.ly.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ly.dto.CarInfoDto;
import com.ly.entity.Car;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface CarMapper extends BaseMapper<Car> {

    //管理员分页查询
    public Page<CarInfoDto> adminPageCarList(Page<CarInfoDto> carInfoDtoPage, @Param("name") String name, @Param("statTime")String statTime, @Param("endTime")String endTime, @Param("keyValues") String keyValues, @Param("auditStatus") Integer auditStatus);

    //普通用户分页查询
    public Page<CarInfoDto> ordinaryPageCarList(Page<CarInfoDto> carInfoDtoPage, @Param("name") String name, @Param("statTime")String statTime, @Param("endTime")String endTime, @Param("keyValues") String keyValues, @Param("loanableStatus") Integer loanableStatus);


    //会员用户分页查询自己发布的信息
    public Page<CarInfoDto> vipPageCarList(Page<CarInfoDto> carInfoDtoPage, @Param("name") String name, @Param("statTime")String statTime, @Param("endTime")String endTime, @Param("keyValues") String keyValues, @Param("loanableStatus") Integer loanableStatus,@Param("auditStatus")Integer auditStatus,@Param("userId")String userId);


}
